<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    section {
      padding: 2px;
      display: flex;
      flex-wrap: wrap;
    }

    section::after {
    / / 处理最后一行 content: '';
      flex-grow: 999999999;
    }

    div {
      margin: 2px;
      position: relative;
      height: 200px;
      flex-grow: 1;
      background-color: violet;
    }

    div img {
      max-width: 100%;
      min-width: 100%;
      height: 200px;
      /*object-fit: cover;*/
      vertical-align: bottom;
    }

  </style>
</head>
<body>

<div>
  <section>
    <div>
      <img src="https://xieranmaya.github.io/images/cats/stock-photo-74402039.jpg"/>
    </div>
    <div>
      <img src="https://xieranmaya.github.io/images/cats/stock-photo-132586903.jpg"/>
    </div>
    <div>
      <img src="https://xieranmaya.github.io/images/cats/stock-photo-132046989.jpg"/>
    </div>
    <div>
      <img src="https://xieranmaya.github.io/images/cats/stock-photo-147969173.jpg"/>
    </div>
    <div>
      <img src="https://xieranmaya.github.io/images/cats/stock-photo-132311221.jpg"/>
    </div>
  </section>
</div>
</body>
</html>
